﻿<Page x:Class="AvalonLibraryTest.Pages.InlineDialogs"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:av="http://schemas.codeplex.com/wpfcontrib/xaml/presentation"
      xmlns:pages="clr-namespace:AvalonLibraryTest.Pages"
      mc:Ignorable="d"
      d:DesignHeight="300"
      d:DesignWidth="300"
      Title="InlineDialogs"
      Name="This">
    <FrameworkElement.Resources>
        <DataTemplate DataType="{x:Type pages:DialogSampleContent}">
            <StackPanel Background="Thistle">
                <Button Click="Button_Click"
                        Content="Open"
                        Padding="10"
                        Margin="10" />
                <Button Command="av:InlineModalDialog.CloseCommand"
                        Content="Close"
                        Padding="10"
                        Margin="10"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center" />
            </StackPanel>
        </DataTemplate>
    </FrameworkElement.Resources>
    <av:InlineModalDecorator Target="{x:Reference This}">
        <Grid>
            <Button Padding="50"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Content="Show"
                    Click="Button_Click" />
        </Grid>
    </av:InlineModalDecorator>
</Page>
